package com.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class BuyerExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public BuyerExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andBuidIsNull() {
            addCriterion("buid is null");
            return (Criteria) this;
        }

        public Criteria andBuidIsNotNull() {
            addCriterion("buid is not null");
            return (Criteria) this;
        }

        public Criteria andBuidEqualTo(String value) {
            addCriterion("buid =", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotEqualTo(String value) {
            addCriterion("buid <>", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidGreaterThan(String value) {
            addCriterion("buid >", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidGreaterThanOrEqualTo(String value) {
            addCriterion("buid >=", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidLessThan(String value) {
            addCriterion("buid <", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidLessThanOrEqualTo(String value) {
            addCriterion("buid <=", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidLike(String value) {
            addCriterion("buid like", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotLike(String value) {
            addCriterion("buid not like", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidIn(List<String> values) {
            addCriterion("buid in", values, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotIn(List<String> values) {
            addCriterion("buid not in", values, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidBetween(String value1, String value2) {
            addCriterion("buid between", value1, value2, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotBetween(String value1, String value2) {
            addCriterion("buid not between", value1, value2, "buid");
            return (Criteria) this;
        }

        public Criteria andBunameIsNull() {
            addCriterion("buname is null");
            return (Criteria) this;
        }

        public Criteria andBunameIsNotNull() {
            addCriterion("buname is not null");
            return (Criteria) this;
        }

        public Criteria andBunameEqualTo(String value) {
            addCriterion("buname =", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameNotEqualTo(String value) {
            addCriterion("buname <>", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameGreaterThan(String value) {
            addCriterion("buname >", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameGreaterThanOrEqualTo(String value) {
            addCriterion("buname >=", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameLessThan(String value) {
            addCriterion("buname <", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameLessThanOrEqualTo(String value) {
            addCriterion("buname <=", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameLike(String value) {
            addCriterion("buname like", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameNotLike(String value) {
            addCriterion("buname not like", value, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameIn(List<String> values) {
            addCriterion("buname in", values, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameNotIn(List<String> values) {
            addCriterion("buname not in", values, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameBetween(String value1, String value2) {
            addCriterion("buname between", value1, value2, "buname");
            return (Criteria) this;
        }

        public Criteria andBunameNotBetween(String value1, String value2) {
            addCriterion("buname not between", value1, value2, "buname");
            return (Criteria) this;
        }

        public Criteria andBusexIsNull() {
            addCriterion("busex is null");
            return (Criteria) this;
        }

        public Criteria andBusexIsNotNull() {
            addCriterion("busex is not null");
            return (Criteria) this;
        }

        public Criteria andBusexEqualTo(String value) {
            addCriterion("busex =", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexNotEqualTo(String value) {
            addCriterion("busex <>", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexGreaterThan(String value) {
            addCriterion("busex >", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexGreaterThanOrEqualTo(String value) {
            addCriterion("busex >=", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexLessThan(String value) {
            addCriterion("busex <", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexLessThanOrEqualTo(String value) {
            addCriterion("busex <=", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexLike(String value) {
            addCriterion("busex like", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexNotLike(String value) {
            addCriterion("busex not like", value, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexIn(List<String> values) {
            addCriterion("busex in", values, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexNotIn(List<String> values) {
            addCriterion("busex not in", values, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexBetween(String value1, String value2) {
            addCriterion("busex between", value1, value2, "busex");
            return (Criteria) this;
        }

        public Criteria andBusexNotBetween(String value1, String value2) {
            addCriterion("busex not between", value1, value2, "busex");
            return (Criteria) this;
        }

        public Criteria andBubirthdayIsNull() {
            addCriterion("bubirthday is null");
            return (Criteria) this;
        }

        public Criteria andBubirthdayIsNotNull() {
            addCriterion("bubirthday is not null");
            return (Criteria) this;
        }

        public Criteria andBubirthdayEqualTo(Date value) {
            addCriterionForJDBCDate("bubirthday =", value, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayNotEqualTo(Date value) {
            addCriterionForJDBCDate("bubirthday <>", value, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayGreaterThan(Date value) {
            addCriterionForJDBCDate("bubirthday >", value, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("bubirthday >=", value, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayLessThan(Date value) {
            addCriterionForJDBCDate("bubirthday <", value, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("bubirthday <=", value, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayIn(List<Date> values) {
            addCriterionForJDBCDate("bubirthday in", values, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayNotIn(List<Date> values) {
            addCriterionForJDBCDate("bubirthday not in", values, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("bubirthday between", value1, value2, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBubirthdayNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("bubirthday not between", value1, value2, "bubirthday");
            return (Criteria) this;
        }

        public Criteria andBuimgIsNull() {
            addCriterion("buimg is null");
            return (Criteria) this;
        }

        public Criteria andBuimgIsNotNull() {
            addCriterion("buimg is not null");
            return (Criteria) this;
        }

        public Criteria andBuimgEqualTo(String value) {
            addCriterion("buimg =", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgNotEqualTo(String value) {
            addCriterion("buimg <>", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgGreaterThan(String value) {
            addCriterion("buimg >", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgGreaterThanOrEqualTo(String value) {
            addCriterion("buimg >=", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgLessThan(String value) {
            addCriterion("buimg <", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgLessThanOrEqualTo(String value) {
            addCriterion("buimg <=", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgLike(String value) {
            addCriterion("buimg like", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgNotLike(String value) {
            addCriterion("buimg not like", value, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgIn(List<String> values) {
            addCriterion("buimg in", values, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgNotIn(List<String> values) {
            addCriterion("buimg not in", values, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgBetween(String value1, String value2) {
            addCriterion("buimg between", value1, value2, "buimg");
            return (Criteria) this;
        }

        public Criteria andBuimgNotBetween(String value1, String value2) {
            addCriterion("buimg not between", value1, value2, "buimg");
            return (Criteria) this;
        }

        public Criteria andBupwdIsNull() {
            addCriterion("bupwd is null");
            return (Criteria) this;
        }

        public Criteria andBupwdIsNotNull() {
            addCriterion("bupwd is not null");
            return (Criteria) this;
        }

        public Criteria andBupwdEqualTo(String value) {
            addCriterion("bupwd =", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdNotEqualTo(String value) {
            addCriterion("bupwd <>", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdGreaterThan(String value) {
            addCriterion("bupwd >", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdGreaterThanOrEqualTo(String value) {
            addCriterion("bupwd >=", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdLessThan(String value) {
            addCriterion("bupwd <", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdLessThanOrEqualTo(String value) {
            addCriterion("bupwd <=", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdLike(String value) {
            addCriterion("bupwd like", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdNotLike(String value) {
            addCriterion("bupwd not like", value, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdIn(List<String> values) {
            addCriterion("bupwd in", values, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdNotIn(List<String> values) {
            addCriterion("bupwd not in", values, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdBetween(String value1, String value2) {
            addCriterion("bupwd between", value1, value2, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBupwdNotBetween(String value1, String value2) {
            addCriterion("bupwd not between", value1, value2, "bupwd");
            return (Criteria) this;
        }

        public Criteria andBusaltIsNull() {
            addCriterion("busalt is null");
            return (Criteria) this;
        }

        public Criteria andBusaltIsNotNull() {
            addCriterion("busalt is not null");
            return (Criteria) this;
        }

        public Criteria andBusaltEqualTo(String value) {
            addCriterion("busalt =", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltNotEqualTo(String value) {
            addCriterion("busalt <>", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltGreaterThan(String value) {
            addCriterion("busalt >", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltGreaterThanOrEqualTo(String value) {
            addCriterion("busalt >=", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltLessThan(String value) {
            addCriterion("busalt <", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltLessThanOrEqualTo(String value) {
            addCriterion("busalt <=", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltLike(String value) {
            addCriterion("busalt like", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltNotLike(String value) {
            addCriterion("busalt not like", value, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltIn(List<String> values) {
            addCriterion("busalt in", values, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltNotIn(List<String> values) {
            addCriterion("busalt not in", values, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltBetween(String value1, String value2) {
            addCriterion("busalt between", value1, value2, "busalt");
            return (Criteria) this;
        }

        public Criteria andBusaltNotBetween(String value1, String value2) {
            addCriterion("busalt not between", value1, value2, "busalt");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}